import { Shop } from 'shop-model.js';
var shop = new Shop();
Page({

  data: {

  },
  onLoad: function (options) {
  },
  onShow:function(){
    this.getMoney();
  },
  //获取收益
  getMoney:function(){
    var that = this;
    var params ={}
    shop.record(params, (data) => {
      that.setData({
        total: data.total,
        waiting: data.waiting,
        withdrawable: data.withdrawable
      })
    });
  },
  //流水
  toDetail: function (e) {
    var type = e.currentTarget.dataset.type;
    wx.navigateTo({
      url: 'score-log?type='+type
    })
  },

})